package com.javastudy.autowiredStudy.condationalStudy;

import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Bean;

/**
 * @author mac
 * @date 2021/9/8 6:21 下午
 */
@ConditionalOnClass(B.class)
public class CondationalTest {
    @Bean
    public A newAinstance(){
        return new A();
    }
}

/**
 * 使用自定义注解
 */
@MyConditionOnProperty
class A{}
class B{}